[+:   -*- Mode: nroff -*- AutoGen5 template man=%s.1a :+][+: 
(define man-sect "8") 
(define prog-name (string-downcase! (get "prog-name")))
(define PROG_NAME (string-tr! (get "prog-name") "a-z^-" "A-Z__"))
(define prog_name (string-tr! (get "prog-name") "A-Z^-" "a-z__"))  
:+][+: (setenv "SHELL" "/bin/sh") 
:+].Dd [+: `date +%Y-%m-%d` :+]
.Os [+: %os (string-upcase! "%s") :+] [version/release]
.Dt [+: %prog-name (string-upcase! "%s") :+] [+: (. man-sect) :+]
.\"  
.\"  new section
.\"
.Sh NAME
.Nm [+: prog-name :+]
.Nd [+: prog-title :+]
[+:
;; The following "dne" argument is a string of 5 characters:
;; '.' '\\' '"' and two spaces.  It _is_ hard to read.
;;
(dne ".\\\"  ") :+][+:  # balance quotes for emacs: "
:+]
.\"  
.\"  new section
.\"
.Sh SYNOPSIS
.Nm [+: %prog-name (string-upcase! "%s") :+][+:
    (define test (if (exist? "prog-name") #t #f)) :+][+:
    (define named-mode (not (or test (exist? "long_opts" )))) :+][+:
    IF (and test (exist?  "flag.value") ) :+][+:
	flag.value :+][+:
    ENDIF
:+]
.\"
.\" new section
.\"
.Sh DESCRIPTION
This manual page briefly documents the \fB[+:
    (. prog-name) :+]\fP command.
[+:
IF (exist? "prog-man-descrip")   :+][+:
  FOR prog-man-descrip "\n.PP\n" :+][+:
    prog-man-descrip             :+][+:
  ENDFOR                         :+][+:
ELIF (exist? "detail")           :+][+:
  FOR detail  "\n.PP\n"          :+][+:
    (string-substitute (get "detail") "\\" "\\\\") :+][+:
  ENDFOR                         :+][+:
ELSE
  :+]Its description is not documented.[+:
ENDIF :+]
